<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <link rel="shortcut icon" th:href="@{/favicon.ico}"/>
  <title>主页</title>
</head>
<body>
登录成功
<table border="1">
  <tr>
    <td>tokenName</td>
    <td th:text="${tokenInfo.tokenName}"></td>
  </tr>
  <tr>
    <td>tokenValue</td>
    <td th:text="${tokenInfo.tokenValue}"></td>
  </tr>
  <tr>
    <td>isLogin</td>
    <td th:text="${tokenInfo.isLogin}"></td>
  </tr>
  <tr>
    <td>loginId</td>
    <td th:text="${tokenInfo.loginId}"></td>
  </tr>
  <tr>
    <td>loginKey</td>
    <td th:text="${tokenInfo.loginKey}"></td>
  </tr>
  <tr>
    <td>tokenTimeout</td>
    <td th:text="${tokenInfo.tokenTimeout}"></td>
  </tr>
  <tr>
    <td>tokenSessionTimeout</td>
    <td th:text="${tokenInfo.tokenSessionTimeout}"></td>
  </tr>
  <tr>
    <td>loginDevice</td>
    <td th:text="${tokenInfo.loginDevice}"></td>
  </tr>
</table>
</body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script>
  function login(){
    var params = {};
    params.userName = $("#userName").val();
    params.userPwd = $("#userPwd").val();
    $.ajax({
      type : "post",
      url : "/login",
      contentType: "application/json",
      dataType: "json",
      data: JSON.stringify(params),
      success:function (data) {
          if (data.success){
            window.location.href = "/index.html";
          }
      }
    })
  }
</script>
</html>